package thread.test_3.demo_2;

public class Desk {
    // 共享总数据
    private int food;
    // 桌子状态：存在true，不存在：false
    private boolean flag = false;
    public Desk(int food) {
        this.food = food;
    }

    /**
     * 获取
     * @return food
     */
    public int getFood() {
        return food;
    }

    /**
     * 设置
     * @param food
     */
    public void setFood(int food) {
        this.food = food;
    }

    /**
     * 获取
     * @return flag
     */
    public boolean isFlag() {
        return flag;
    }

    /**
     * 设置
     * @param flag
     */
    public void setFlag(boolean flag) {
        this.flag = flag;
    }

}
